﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageLayout.Master" AutoEventWireup="true" CodeBehind="frmHocphi.aspx.cs" Inherits="BVVD_Website.ql_hoc_vien.frmHocphi2" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        div.RadListBox .rlbGroup {
            overflow: auto;
        }

        .rsbHeader ul,
        .rsbListItem ul {
            margin: 0;
            padding: 0;
            width: 100%;
            display: inline-block;
            list-style-type: none;
        }

        .rsbHeader ul {
            padding-left: 5px;
        }

        .col1,
        .col2,
        .col3 {
            margin: 0;
            padding: 0 5px 0 0;
            width: 110px;
            line-height: 14px;
            float: left;
        }


        html .rsbSlide,
        html .rsbDropDownSlide {
            z-index: 90002;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="5">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel runat="server" ID="pnlAjax" LoadingPanelID="RadAjaxLoadingPanel1">
        <div id="Div1" class="mpBottomContent" runat="server">
            <asp:Label runat="server" ID="lblMenu" Style="margin: 0 auto 0 auto; font-family: 'Microsoft Sans Serif'; font-size: larger; color: forestgreen" Text="DANH SÁCH ĐÓNG HỌC PHÍ"></asp:Label>
            
            <table style="margin: 0 auto 0 auto; border: 5px thin red; width: 90% !important; padding: 5px 5px 5px 5px">
                <caption style="float: left">
                    <telerik:RadDropDownList DefaultMessage="Chọn lớp" DropDownHeight="200" Skin="Hay" OnSelectedIndexChanged="ddlLOPHOC_SelectedIndexChanged" AutoPostBack="true" runat="server" ID="ddlLOPHOC"></telerik:RadDropDownList>

                </caption>
                <tr>
                    <td>
                        <telerik:RadGrid ID="grvHocphi" Skin="Hay" AllowFilteringByColumn="true" MasterTableView-NoMasterRecordsText="Không tìm thấy bản ghi nào" MasterTableView-ShowHeadersWhenNoRecords="true" ClientSettings-ColumnsReorderMethod="Reorder" ClientSettings-AllowColumnsReorder="true" ClientSettings-Animation-AllowColumnReorderAnimation="true" ClientSettings-Animation-ColumnReorderAnimationDuration="300" PageSize="15" AllowSorting="true" AutoGenerateColumns="false" AllowPaging="true" ClientSettings-AllowDragToGroup="true" runat="server"  OnItemDataBound="grvGiayChungnhan_ItemDataBound" OnItemCommand="grvGiayChungnhan_ItemCommand" OnNeedDataSource="grvHocphi_NeedDataSource" >

                            <PagerStyle Mode="NextPrevAndNumeric" PageSizeControlType="RadComboBox" Wrap="true" AlwaysVisible="true" />

                            <MasterTableView CommandItemDisplay="Top" EnableNoRecordsTemplate="true" CssClass="MasterClass" ShowFooter="true" EditMode="PopUp" Summary="SUMMARY" ShowHeadersWhenNoRecords="true"
                                DataKeyNames="RECID">
                                <CommandItemSettings AddNewRecordText="Thêm mới" RefreshText="Làm mới danh sách" ExportToPdfText="Xuất file dạng PDF" ShowExportToPdfButton="true"></CommandItemSettings>
                                <CommandItemSettings ExportToExcelText="Xuất file dạng Excel" ShowExportToExcelButton="true"></CommandItemSettings>

                                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

                                <CommandItemTemplate>
                                    <div style="padding: 5px 5px; float: right">

                                        <telerik:RadButton ButtonType="LinkButton" Skin="Metro" BorderStyle="None" Text="Lưu" runat="server" ID="lbtnSave" CommandName="GiayCN">
                                            <Icon PrimaryIconCssClass="rbSave" PrimaryIconLeft="4" PrimaryIconRight="4" />
                                        </telerik:RadButton>
                                        &nbsp;&nbsp; 
                                    <%--<telerik:RadButton ID="LinkButton2" Skin="Telerik" ButtonType="StandardButton" runat="server" CommandName="InitInsert" Text="Thêm mới" Visible='<%# !grvGiayChungnhan.MasterTableView.IsItemInserted %>'></telerik:RadButton>&nbsp;&nbsp; --%>
                                        <telerik:RadButton ID="LinkButton4" Skin="Metro" BorderStyle="None" ButtonType="LinkButton" runat="server" CommandName="RebindGrid" Text="Làm mới danh sách">
                                            <Icon PrimaryIconCssClass="rbRefresh" PrimaryIconLeft="4" PrimaryIconRight="4" />
                                        </telerik:RadButton>
                                    </div>
                                </CommandItemTemplate>

                                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"></ExpandCollapseColumn>
                                <NoRecordsTemplate>
                                    <div>
                                        Không có bản ghi nào
                                    </div>
                                </NoRecordsTemplate>
                                <Columns>

                                    <telerik:GridBoundColumn UniqueName="RECID" Display="false" EditFormColumnIndex="1" HeaderStyle-Width="80" ItemStyle-Width="80" ReadOnly="true" HeaderText="RECIDAAAA" DataField="RECID">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                        <HeaderStyle ForeColor="Silver" Width="20px"></HeaderStyle>
                                        <ItemStyle ForeColor="Gray"></ItemStyle>
                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn UniqueName="MAHV" ItemStyle-HorizontalAlign="Left" FilterControlWidth="80%" HeaderStyle-Width="15%" HeaderText="Mã học viên" DataField="MAHV">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn UniqueName="TENHV" ItemStyle-HorizontalAlign="Left" FilterControlWidth="80%" HeaderStyle-Width="20%" HeaderText="Học viên" DataField="TENHV">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>

                                    <telerik:GridTemplateColumn UniqueName="SOTIEN" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FilterControlWidth="70%" AllowFiltering="false" HeaderStyle-Width="20%" HeaderText="Số tiền" DataField="SOTIEN">
                                        <ItemTemplate>
                                            <telerik:RadNumericTextBox runat="server" ShowSpinButtons="true" MinValue="0" Skin="Telerik" ID="txtGCN" DbValue='<%# DataBinder.Eval(Container.DataItem,"SOTIEN") %>'></telerik:RadNumericTextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>

                                    <telerik:GridTemplateColumn UniqueName="LOAITIEN" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" AllowFiltering="false" HeaderStyle-Width="20%" ItemStyle-Width="20%" Display="true" HeaderText="Loại tiền" DataField="LOAITIEN">
                                        <ItemTemplate>
                                            <telerik:RadDropDownList DataSourceID="LinqDataSource1" DataTextField="TENDM" Width="150" DropDownWidth="150" DropDownHeight="200" DataValueField="MADM" runat="server" ID="ddlLOAITIEN"></telerik:RadDropDownList>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>

                                    <telerik:GridTemplateColumn UniqueName="NGAYDHP"  HeaderStyle-HorizontalAlign="Center" AllowFiltering="false" ItemStyle-HorizontalAlign="Center" HeaderText="Ngày đóng" FilterControlWidth="70%" Display="true" HeaderStyle-Width="20%" DataField="NGAYDHP">
                                        <ItemTemplate>
                                            <telerik:RadDatePicker runat="server" Skin="Metro" DateInput-DisplayDateFormat="dd/MM/yyyy" Width="90%" DataFormatString="{0:dd/MM/yyyy}" DbSelectedDate='<%# DataBinder.Eval(Container.DataItem,"NGAYDHP") %>' ID="txtNGAYNHAN"></telerik:RadDatePicker>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>


                                    <telerik:GridTemplateColumn UniqueName="LAN" Display="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" AllowFiltering="false" HeaderStyle-Width="10%"  HeaderText="Lần đóng" DataField="LAN">
                                        <ItemTemplate>
                                            <telerik:RadNumericTextBox runat="server" ID="txtLAN" Width="80%" MinValue="0" DbValue='<%# DataBinder.Eval(Container.DataItem,"LAN") %>' ShowSpinButtons="true" NumberFormat-DecimalDigits="0"></telerik:RadNumericTextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>

                                    <telerik:GridBoundColumn UniqueName="MALOAITIEN" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="20%" Display="false" HeaderText="Mã loại tiền" DataField="LOAITIEN">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn UniqueName="NGUOITHU" ItemStyle-HorizontalAlign="Left" Display="false" HeaderText="Người thu" DataField="NGUOITHU">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn UniqueName="GHICHU" ItemStyle-HorizontalAlign="Left" Display="false" HeaderText="Ghi chú" DataField="GHICHU">
                                        <ColumnValidationSettings>
                                            <ModelErrorMessage Text=""></ModelErrorMessage>
                                        </ColumnValidationSettings>
                                    </telerik:GridBoundColumn>

                                    <%--<telerik:GridEditCommandColumn EditText="Sửa" ButtonType="ImageButton" ItemStyle-Width="30" HeaderText="Sửa" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="30">
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn CommandName="Delete" HeaderText="Xóa" ButtonType="ImageButton" HeaderStyle-Width="30" ConfirmDialogType="RadWindow" ConfirmTextFormatString="Bạn chắc chắn muốn xóa bản ghi : \n\n \t Mã học viên : {0} <br> \t số tiền :  {1} \n " ConfirmTextFields="MAHV, SOTIEN" ConfirmTitle="Xác nhận xóa" ConfirmText="Xóa, Hủy" Text="Xóa" UniqueName="btnDelete">
                                    </telerik:GridButtonColumn>--%>
                                </Columns>
                                <EditFormSettings EditFormType="Template" PopUpSettings-ShowCaptionInEditForm="true" PopUpSettings-ScrollBars="None" PopUpSettings-Width="500" InsertCaption="Thu học phí" PopUpSettings-ZIndex="4000" PopUpSettings-Modal="true" CaptionFormatString="Mã học viên {0}" CaptionDataField="MAHV">
                                    <FormTemplate>
                                        <div id="rfd-demo-zone" style="overflow: no-display; border: solid; border-color: whitesmoke; border-width: 5px; padding: 6px 6px 6px 6px;">
                                            <table width="500" style="text-align: left; overflow: no-display" border="0" cellspacing="5" cellpadding="5">
                                                <caption>
                                                    <asp:Label ID="lblLOPHOC" Style="color: green; font-weight: bold" runat="server"></asp:Label>
                                                    
                                                    
                                                </caption>
                                                <tr>
                                                    <td>
                                                        <table style="width: 100%; height: 150px;">
                                                            <tr>
                                                                <td>Học viên</td>
                                                                <td>
                                                                    <%--<telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("MAHV")  %>' ID="txtMAHV"></telerik:RadTextBox>--%>
                                                                    <telerik:RadDropDownList runat="server" DropDownHeight="200" Skin="Telerik" ID="ddlMAHV"></telerik:RadDropDownList>
                                                                    <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" Display="Dynamic" runat="server" ControlToValidate="ddlMAHV" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>--%>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Số tiền</td>
                                                                <td>
                                                                    <telerik:RadNumericTextBox NumberFormat-DecimalDigits="2" runat="server" Skin="Telerik" Text='<%# Bind("SOTIEN")  %>' ID="txtSOTIEN"></telerik:RadNumericTextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" Display="Dynamic" runat="server" ControlToValidate="txtSOTIEN" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>

                                                            <tr>
                                                                <td>Loại tiền</td>
                                                                <td>
                                                                    <telerik:RadDropDownList runat="server" DropDownHeight="200" Skin="Telerik" ID="ddlLOAITIEN1"></telerik:RadDropDownList>
                                                                    <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator6" Display="Dynamic" runat="server" ControlToValidate="ddlLOAITIEN" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>--%>
                                                                </td>
                                                            </tr>

                                                            <tr>
                                                                <td>Ngày nộp </td>
                                                                <td>
                                                                    <telerik:RadDatePicker Skin="Telerik" runat="server" DateInput-DisplayDateFormat="dd/MM/yyyy" ID="rdpNGAYDHP" DbSelectedDate='<%# Bind("NGAYDHP") %>'></telerik:RadDatePicker>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" runat="server" ControlToValidate="rdpNGAYDHP" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>
                                                                </td>
                                                            </tr>


                                                        </table>
                                                    </td>
                                                    <td>
                                                        <table style="width: 100%; height: 150px;">
                                                            <tr>
                                                                <td>Lần nộp</td>
                                                                <td>
                                                                    <telerik:RadNumericTextBox ShowSpinButtons="true" NumberFormat-DecimalDigits="0" runat="server" Skin="Telerik" Text='<%# Bind("LAN")  %>' ID="txtLAN"></telerik:RadNumericTextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Display="Dynamic" runat="server" ControlToValidate="txtLAN" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>

                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Người thu</td>
                                                                <td>
                                                                    <telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("NGUOITHU")  %>' ID="txtNGUOITHU"></telerik:RadTextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" Display="Dynamic" runat="server" ControlToValidate="txtNGUOITHU" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>

                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Ghi chú</td>
                                                                <td>
                                                                    <telerik:RadTextBox runat="server" ID="txtGHICHU" Skin="Telerik" TextMode="MultiLine" Text='<%# Bind("GHICHU")  %>'></telerik:RadTextBox></td>
                                                            </tr>
                                                            <tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" style="text-align: center">
                                                        <asp:LinkButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Thêm mới" : "Cập nhật" %>'
                                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:LinkButton>&nbsp;
                                <asp:LinkButton ID="btnCancel" Text="Hủy" runat="server" CausesValidation="False"
                                    CommandName="Cancel"></asp:LinkButton></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </FormTemplate>
                                </EditFormSettings>
                            </MasterTableView>
                            <ClientSettings>
                                <ClientEvents OnPopUpShowing="PopUpShowing" />
                                <%--<ClientEvents OnRowDblClick="RowDblClick" />--%>
                                <Selecting AllowRowSelect="true" />
                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                <Animation AllowColumnReorderAnimation="true" ColumnReorderAnimationDuration="500" />

                            </ClientSettings>
                            <ExportSettings Excel-Format="Biff" Pdf-DefaultFontFamily="Arial" FileName="Mydata" IgnorePaging="false" Excel-AutoFitImages="true" Excel-FileExtension="xls" HideStructureColumns="true"></ExportSettings>
                        </telerik:RadGrid>
                    </td>
                </tr>
            </table>
        </div>
        <asp:LinqDataSource ID="LinqDataSource1" OnSelecting="LinqDataSource1_Selecting" runat="server" ContextTypeName="Business.BVVDDataContext" EntityTypeName="" TableName="LST_DANHMUCs"></asp:LinqDataSource>
        <telerik:RadNotification ID="rnAlert" runat="server" Width="300" Position="TopRight" EnableRoundedCorners="true"
            EnableShadow="true" Skin="Hay" Overlay="true" Animation="Fade" ContentScrolling="Auto" AnimationDuration="1000" Title="Thông báo">
        </telerik:RadNotification>
    </telerik:RadAjaxPanel>
</asp:Content>
